{% extends "base.html" %}
{% load i18n bootstrap3 dv_filters %}
{% block head_title %}{{ organization }}{% endblock %}

{% block content %}
  {% include "orga/_organization_detail.html" %}

  {% buttons %}
    {% if request.user|can:'orga_crud' and request.user|inusercantons:organization.address_canton or request.user|can:'orga_edit' and  organization in user.managed_organizations.all %}
      <a class="btn btn-primary pull-right" href="{% url 'organization-update' pk=organization.pk %}">{% trans "Éditer" %}</a>
    {% endif %}
    {% if request.user|can:'orga_detail_all' %}
      <a class="btn btn-default" href="{% url 'organization-list' %}">{% trans "Retour à la liste des établissements" %}</a>
    {% endif %}
  {% endbuttons %}
{% endblock %}
